import { userRequest } from '@/utils/request'
enum API {
  GET_PERMISSION = '/admin/acl/permission',
  REMOVE_PERMISSION = '/admin/acl/permission/remove/',
  SAVE_PERMISSION = '/admin/acl/permission/save',
  UPDATE_PERMISSION = '/admin/acl/permission/update'
}

export const reqGetPermission = () =>
  userRequest.get<any, any>(API.GET_PERMISSION)
export const reqRemovePermission = (id: number) =>
  userRequest.delete<any, any>(API.REMOVE_PERMISSION + id)
export const reqSavePermission = (data: any) =>
  userRequest.post<any, any>(API.SAVE_PERMISSION, data)
export const reqUpdatePermission = (data: any) =>
  userRequest.put<any, any>(API.UPDATE_PERMISSION, data)
